package com.daxt.model.service.accept.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "归档任务单", description = "归档任务单")
@TableName("work_order")
public class WorkOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "调用接口名称，如：oa、cw。", name = "appId")
    private String appId;
    @ApiModelProperty(value = "接口校验码", name = "appToken")
    private String appToken;
    @ApiModelProperty(value = "接口调用方的单位名称", name = "companyCode")
    private String companyCode;
    @ApiModelProperty(value = "任务包类型。取值“案卷”或“文件”“散文件”", name = "rwblx")
    private String rwblx;
    @ApiModelProperty(value = "任务单编号", name = "rwdh")
    private String rwdh;
    @ApiModelProperty(value = "任务单标题", name = "rwdbt")
    private String rwdbt;
    @ApiModelProperty(value = "归档日期", name = "gdsj")
    private String gdsj;
    @ApiModelProperty(value = "归档人", name = "gdr")
    private String gdr;
    @ApiModelProperty(value = "业务简称", name = "ywjc")
    private String ywjc;
    @ApiModelProperty(value = "电子档案数量", name = "sl")
    private String sl;
    @ApiModelProperty(value = "归档说明", name = "gdsm")
    private String gdsm;
    @ApiModelProperty(value = "归档任务包大小", name = "scdx")
    private String scdx;
    @ApiModelProperty(value = "归档任务包名称", name = "scmc")
    private String scmc;
    @ApiModelProperty(value = "任务包上传路径", name = "sclj")
    private String sclj;

    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间", name = "createData", example = "2019-09-09 00:00:00")
    private LocalDateTime createData;

    @ApiModelProperty(value = "状态 0失败  1成功", name = "state")
    private String state;
    @ApiModelProperty(value = "失败原因", name = "reason")
    private String reason;
    @ApiModelProperty(value = "任务包保存路径", name = "savePath")
    private String savePath;

    @ApiModelProperty(value = "成功条数", name = "successCount")
    private int successCount;
    @ApiModelProperty(value = "失败条数", name = "failCount")
    private int failCount;


}
